Optimal. Leaf size=37 \[ x (a B+A b)+\frac {a A \log (\sin (c+d x))}{d}-\frac {b B \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3589, 3475, 3531} \[ x (a B+A b)+\frac {a A \log (\sin (c+d x))}{d}-\frac {b B \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3531
Rule 3589
Rubi steps
\begin {align*} \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx &=(b B) \int \tan (c+d x) \, dx+\int \cot (c+d x) (a A+(A b+a B) \tan (c+d x)) \, dx\\ &=(A b+a B) x-\frac {b B \log (\cos (c+d x))}{d}+(a A) \int \cot (c+d x) \, dx\\ &=(A b+a B) x-\frac {b B \log (\cos (c+d x))}{d}+\frac {a A \log (\sin (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 44, normalized size = 1.19 \[ \frac {a A (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d}+a B x+A b x-\frac {b B \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 59, normalized size = 1.59 \[ \frac {2 \, {\left (B a + A b\right )} d x + A a \log \left (\frac {\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - B b \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.43, size = 53, normalized size = 1.43 \[ \frac {2 \, A a \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 2 \, {\left (B a + A b\right )} {\left (d x + c\right )} - {\left (A a - B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.44, size = 51, normalized size = 1.38 \[ A x b +a B x +\frac {a A \ln \left (\sin \left (d x +c \right )\right )}{d}+\frac {A b c}{d}-\frac {b B \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {B a c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.10, size = 52, normalized size = 1.41 \[ \frac {2 \, A a \log \left (\tan \left (d x + c\right )\right ) + 2 \, {\left (B a + A b\right )} {\left (d x + c\right )} - {\left (A a - B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.47, size = 69, normalized size = 1.86 \[ \frac {A\,a\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (A+B\,1{}\mathrm {i}\right )\,\left (a+b\,1{}\mathrm {i}\right )}{2\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (A-B\,1{}\mathrm {i}\right )\,\left (b+a\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.41, size = 78, normalized size = 2.11 \[ \begin {cases} - \frac {A a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {A a \log {\left (\tan {\left (c + d x \right )} \right )}}{d} + A b x + B a x + \frac {B b \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + B \tan {\relax (c )}\right ) \left (a + b \tan {\relax (c )}\right ) \cot {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________